package com.wgts.wgts.mvp.view.activity.otherhomepage;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

import java.util.List;

/*
 *
 *
 *   data:2018/9/1716:46
 *
 */public class ShopClassViewPageAdapter extends FragmentStatePagerAdapter {
     private List<Fragment> fragments;
    public ShopClassViewPageAdapter(FragmentManager fm, List<Fragment> fragments) {
        super(fm);
        this.fragments = fragments;
    }


    @Override
    public Fragment getItem(int i) {
        return fragments.get(i);
    }

    @Override
    public int getCount() {
        return fragments != null ? fragments.size() : 0;
    }
}
